package com.loanapp.base.database.common.base;



import com.baomidou.mybatisplus.plugins.Page;
import com.loanapp.base.common.exception.BusinessException;

import java.util.List;
import java.util.Map;

/**
 * Created by DIY on 2017/5/25.
 */
public interface BaseService<T,Tq,PK> {

    public Long Insert(T t) throws BusinessException;

    public boolean DeleteByPk(PK pk) throws BusinessException;

    public boolean Update(T t) throws BusinessException;

    public T selectByPk(PK pk) throws BusinessException;

    public T selectByModel(Tq tq) throws BusinessException;

    public T selectBySelf(T t) throws BusinessException;

    public List<T> selectListByModel(Tq tq) throws BusinessException;

    public Long selectCountByQueryMap(Tq tq);

    public List<T> selectPageListByQueryMap(Tq tq)throws BusinessException;

    public Page<T> selectPageList(Tq tq) throws  BusinessException;

}
